package switcher;

import common.SpinBox;
import common.TVConsts;

public class SpinBoxSwitcher extends AbsSwitcher {
	SpinBox sb = new SpinBox();

	public SpinBoxSwitcher(String serverName, int port, String mcAddress,
			int mcPort) {
		super(serverName, port, mcAddress, mcPort);

	}

	public SpinBoxSwitcher() {
		super(TVConsts.SERVER_NAME, TVConsts.CH3_PORT, TVConsts.MC_CH3_ADDRESS,
				TVConsts.MC_PORT);

	}

	public SpinBox getSpinBox() {
		return sb;
	}

	@Override
	public void msgInterrupt(byte[] data) {
//		System.out.println(new String(data));
		sb.setDegree(Double.parseDouble(new String(data)));
	}

}
